package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallSupplierShop;
import com.appkubes.mall.core.po.MallSupplierShopExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallSupplierShopMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier_shop
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSupplierShopSqlProvider.class, method="countByExample")
    long countByExample(MallSupplierShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier_shop
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallSupplierShopSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallSupplierShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier_shop
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_supplier_shop",
        "where supplier_key = #{supplierKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String supplierKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier_shop
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_supplier_shop (supplier_key, app_key, ",
        "shop_type, shop_name, ",
        "shop_url, shop_category, ",
        "description, `status`, ",
        "create_time, update_time, ",
        "version)",
        "values (#{supplierKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{shopType,jdbcType=VARCHAR}, #{shopName,jdbcType=VARCHAR}, ",
        "#{shopUrl,jdbcType=VARCHAR}, #{shopCategory,jdbcType=VARCHAR}, ",
        "#{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallSupplierShop record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier_shop
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallSupplierShopSqlProvider.class, method="insertSelective")
    int insertSelective(MallSupplierShop record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier_shop
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSupplierShopSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="supplier_key", property="supplierKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_type", property="shopType", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_name", property="shopName", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_url", property="shopUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_category", property="shopCategory", jdbcType=JdbcType.VARCHAR),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallSupplierShop> selectByExampleWithRowbounds(MallSupplierShopExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier_shop
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSupplierShopSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="supplier_key", property="supplierKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_type", property="shopType", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_name", property="shopName", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_url", property="shopUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_category", property="shopCategory", jdbcType=JdbcType.VARCHAR),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallSupplierShop> selectByExample(MallSupplierShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier_shop
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "supplier_key, app_key, shop_type, shop_name, shop_url, shop_category, description, ",
        "`status`, create_time, update_time, version",
        "from mall_supplier_shop",
        "where supplier_key = #{supplierKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="supplier_key", property="supplierKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_type", property="shopType", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_name", property="shopName", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_url", property="shopUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_category", property="shopCategory", jdbcType=JdbcType.VARCHAR),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallSupplierShop selectByPrimaryKey(String supplierKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier_shop
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSupplierShopSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallSupplierShop record, @Param("example") MallSupplierShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier_shop
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSupplierShopSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallSupplierShop record, @Param("example") MallSupplierShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier_shop
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSupplierShopSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallSupplierShop record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_supplier_shop
     *
     * @mbg.generated
     */
    @Update({
        "update mall_supplier_shop",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "shop_type = #{shopType,jdbcType=VARCHAR},",
          "shop_name = #{shopName,jdbcType=VARCHAR},",
          "shop_url = #{shopUrl,jdbcType=VARCHAR},",
          "shop_category = #{shopCategory,jdbcType=VARCHAR},",
          "description = #{description,jdbcType=VARCHAR},",
          "`status` = #{status,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "version = #{version,jdbcType=INTEGER}",
        "where supplier_key = #{supplierKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallSupplierShop record);
}